package com.cn.main.web;
import com.cn.main.interceptor.LogCollect;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.Map;
/**
 * Created by chenyuncong on 2018/5/21.
 */
@RestController
@RequestMapping("test")
public class TestController {

    @LogCollect(paranName = "userId")
    @RequestMapping("getInfo")
    public Map<String,Object> getInfo(Integer userId){
        Map<String,Object> map=new HashMap<>();
        map.put("name","小明同学");
        map.put("sex","男");
        return map;
    }


    @RequestMapping("ffmmpeg")
    public String ffmmpeg(){
        String srcPath="/root/test.mp4";
        String tarVideoPath="/root/5.mp4";
        String txt="粤ADE5022";
        int fontSize=35;
        boolean f = FfmPegUtil.processFfmpegWatermkByFont(srcPath,tarVideoPath,txt,fontSize);
        return ""+f;
    }

    @RequestMapping("getInfo2")
    public Map<String,Object> getInfo2(Integer userId){
        Map<String,Object> map=new HashMap<>();
        map.put("name","小明同学2");
        map.put("sex","男");
        return map;
    }
}
